<template>
    <el-card style="margin: 0 auto; max-width: 100%; padding: 16px;">
      <el-form :model="form" label-width="25%">
        <el-form-item :label="$t('user.username')">
          <el-input v-model="form.userName" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item :label="$t('common.telephone')">
          <el-input v-model="form.userTelephone" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item :label="$t('common.email')">
          <el-input v-model="form.userMail" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item :label="$t('group.title')">
          <el-input v-model="form.userGroup" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
    </el-card>
  </template>
  
  <script>
  export default {
    name: "UserInfo",
    data() {
      return {
        form: {},
      };
    },
    created() {
      this.form = JSON.parse(sessionStorage.getItem("userInfo"));
      this.$nextTick(() => {
        // 动态调整布局（如有需要）
      });
    },
  };
  </script>
  
  <style scoped>
  /* 默认样式 */
  .el-card {
    margin: 0 auto;
    max-width: 500px;
    padding: 16px;
  }
  
  .el-form {
    width: 100%;
  }
  
  /* 小屏幕适配 */
  @media (max-width: 768px) {
    .el-card {
      max-width: 100%;
      padding: 8px;
    }
  
    .el-form-item {
      margin-bottom: 12px;
    }
  
    .el-form-item__label {
      font-size: 14px;
    }
  
    .el-input {
      font-size: 14px;
    }
  }
  </style>